#ifndef SCRIPT_HPP_
#define SCRIPT_HPP_

#include <string>
#include <sstream>
#include "script/include/squirrel.h"

namespace lge2d
{

class Script
{
public:
	Script();
	~Script();

	std::string Execute(const char * script);

	void Print(const std::string& message);

	std::string GetOutput() {return m_print_ss.str();}

	int GetGlobal(const char* str_key, int default_value);
	float GetGlobal(const char* str_key, float default_value);
	std::string GetGlobal(const char* str_key,
			const std::string& default_value);

private:
	Script(const Script& other);
	Script& operator=(const Script& other);

	HSQUIRRELVM v;
	std::stringstream m_print_ss;
};

} // namespace lge2d

#endif /* SCRIPT_HPP_ */
